<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<input type="text" value="请输入" id="txt3">
<script>


    var txt3 = document.getElementById('txt3');
    txt3.onclick = function(){
        console.log(this);
        function foo(){
            console.log(this);//window
        }

        foo.call(this);
    }

    //window


</script>
<script>

</script>
</body>
</html>